<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <button>删除定时器</button>
    <script>
      //   setInterval(() => {
      //     console.log(1)
      //   }, 1000)

      //   let i = setTimeout(() => {
      //     console.log(1)
      //   }, 1000)
      //   clearTimeout(i)
      //   let i = window.setInterval(() => {
      //     console.log(+new Date())
      //   }, 1000)

      //   document.querySelector('button').addEventListener('click', () => {
      //     clearInterval(i)
      //   })
    </script>
  </body>
</html>
